<!DOCTYPE html>
<body>
  <canvas id="canvas" width="200" height="400"></canvas>
</body>
<script>
  var canvas = document.getElementById('canvas');
  var ctx = canvas.getContext('2d');
  ctx.fillStyle = 'green';
  ctx.fillRect(0, 0, 100, 150);
  ctx.fillStyle = 'red';
  ctx.fillRect(0, 150, 200, 250);
</script>
